package com.chendx.store.behavior.feign;

import com.chendx.model.goods.pojo.Sku;
import com.chendx.model.goods.pojo.Spu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by chendx on 2022/4/28.
 */
@FeignClient("store-goods")
public interface GoodsFeign {

    /***
     * 根据ID查询Spu数据
     * @param id
     * @return
     */
    @GetMapping("/api/spu/one/{id}")
    public Spu findById(@PathVariable("id") Long id);


    @GetMapping("/api/sku/one/{id}")
    public Sku findSkuById(@PathVariable("id") Long id);
}
